/**
 * 文件描述：路由
 * 创建时间：2023/9/5 11:09
 * 创建人：二
 */
import layout from '@/layout/index.vue'
const RouteView = {
	name: 'RouteView',
	render: (h) => h('router-view')
}

const routes = [
	{
		path: '/login',
		hidden: true,
		component: () => import(/* webpackChunkName: 'login' */ '@/views/login/index.vue')
	},
	{
		path: '/',
		component: layout,
		hidden: true,
		redirect: 'home',
		children: [
			{
				path: 'home',
				component: () => import(/* webpackChunkName: 'home' */ '@/views/home/index.vue'),
				meta: {
					tit: '首页',
					url: '/home',
					icon: 'el-icon-s-home',
					notClose: true,
					notPermit: true
				}
			}
		]
	},
	{
		path: '/system',
		component: layout,
		meta: {
			tit: '系统设置',
			icon: 'el-icon-setting',
			permit: 'system'
		},
		children: [
			{
				path: 'user',
				name: 'User',
				component:  () => import(/* webpackChunkName: 'User' */ '@/views/system/user/index.vue'),
				meta: {
					tit: '用户管理',
					url: '/system/user',
					keepAlive: true,
					permit: 'system:user:list'
				}
			},
			{
				path: 'user/watch',
				name: 'UserWatch',
				component:  () => import(/* webpackChunkName: 'User' */ '@/views/system/user/watch.vue'),
				hidden: true,
				meta: {
					tit: '用户查看',
					url: '/system/user/watch',
					activeMenu: '/system/user'
				}
			},
			{
				path: 'role',
				name: 'Role',
				component:  () => import(/* webpackChunkName: 'Role' */ '@/views/system/role/index.vue'),
				meta: {
					tit: '角色管理',
					url: '/system/role',
					keepAlive: true,
					permit: 'system:role:list'
				}
			},
			{
				path: 'menu',
				name: 'Menu',
				component:  () => import(/* webpackChunkName: 'Menu' */ '@/views/system/menu/index.vue'),
				meta: {
					tit: '菜单管理',
					url: '/system/menu',
					keepAlive: true,
					permit: 'system:menu:list'
				}
			}
		]
	},
	{
		component: layout,
		path: 'link',
		meta: {
			tit: 'vue',
			link: 'https://cn.vuejs.org/',
			permit: 'vue'
		}
	}
]
export default routes;
